package com.macro.mall.controller;

import cn.hutool.json.JSONUtil;
import com.macro.mall.model.BmsConfig;
import lombok.Data;


/**
 * @ClassName TestController
 * @Package com.macro.mall.controller
 * @Description TODO
 * @Author wsx
 * @Date 2024/8/139:38
 * @Version V1.0
 * @Copyright yunshan
 */
public class TestController {
    public static void main(String[] args) {
        BmsConfigParam b=new BmsConfigParam();
        b.setId(1L);
        b.setName("aaa");
        b.setSort(2);
        String s = JSONUtil.toJsonStr(b);
        System.out.println(s);
        BmsConfigParam c=JSONUtil.toBean(s, BmsConfigParam.class);
        System.out.println(c.getSort()+c.getName());
    }

    @Data
    static class BmsConfigParam {
        private Long id;
        private String name;
        private String code;
        private String value;
        private Integer sort;
        private String type;
        private Integer isSystem;
    }
}
